from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from options import options

url = r'http://172.16.36.121/upload/'
driver = webdriver.Chrome(options=options)
driver.get(url)
driver.maximize_window()

# 登录
driver.find_element(By.ID, 'ls_username').clear()
driver.find_element(By.ID, 'ls_username').send_keys('admin')
driver.find_element(By.ID, 'ls_password').clear()
driver.find_element(By.ID, 'ls_password').send_keys('sa')
sleep(3)
driver.find_element(By.XPATH, '//*[@id="lsform"]/div/div/table/tbody/tr[2]/td[3]/button/em').click()
sleep(3)

# 退出
driver.find_element(By.LINK_TEXT, '退出').click()
sleep(3)

driver.quit()
